home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8167 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: skivs.ski.org!usenet
  2. From: tron@eagle.ovik.se (Mikael Olsson)
  3. Newsgroups: comp.lang.c
  4. Subject: String matching snippet wanted
  5. Date: Wed, 28 Feb 1996 21:01:23 GMT
  6. Organization: Eagle Computing
  7. Message-ID: <4h2ftg$rek@skivs.ski.org>
  8. Reply-To: tron@eagle.ovik.se
  9. NNTP-Posting-Host: 194.17.221.200
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. Hi ! Does anyone have a snippet of code that does an "intelligent"
  13. comparation of two strings ?
  14. No pattern matching or regex recognition needed,  I just
  15. want a little function that compares two strings and tells me
  16. just *how* much alike eachother they were. (Much like many WWW search
  17. engines do, actually !)
  18.  
  19. As an example, my name spelled in two ways :
  20. (The right way)  : 
  21.     Mikael Olsson
  22. (The way someone could be spelling it) :
  23.     Michael Olsen
  24.  
  25. This virtual StrMatch() function would then tell me that these
  26. two strings were about 95 % alike.
  27.  
  28. Preferably, the function wouldn't care what order the
  29. words came in, but no worries, if it doesn't I'll add that
  30. functionality myself. I just don't feel up to writing a 
  31. string recognition function right now.
  32.  
  33. Many TIA ! 
  34.  
  35. /Mike
  36.  
  37.  
  38.  
  39.